/*
 * XML Type:  Family
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.Family
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML Family(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class FamilyImpl extends org.isistan.flabot.coremodelEcore.impl.NamedElementModelImpl implements org.isistan.flabot.coremodelEcore.Family
{
    private static final long serialVersionUID = 1L;
    
    public FamilyImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FAMILYELEMENT$0 = 
        new javax.xml.namespace.QName("", "familyElement");
    private static final javax.xml.namespace.QName ASSOCIATEDRESPONSIBILITIES$2 = 
        new javax.xml.namespace.QName("", "associatedResponsibilities");
    private static final javax.xml.namespace.QName ARCHITECTURALUSECASEMAPS$4 = 
        new javax.xml.namespace.QName("", "architecturalUseCaseMaps");
    private static final javax.xml.namespace.QName FUNCTIONALUSECASEMAPS$6 = 
        new javax.xml.namespace.QName("", "functionalUseCaseMaps");
    private static final javax.xml.namespace.QName EVENTS$8 = 
        new javax.xml.namespace.QName("", "events");
    
    
    /**
     * Gets array of all "familyElement" elements
     */
    public org.isistan.flabot.coremodelEcore.FamilyElement[] getFamilyElementArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(FAMILYELEMENT$0, targetList);
            org.isistan.flabot.coremodelEcore.FamilyElement[] result = new org.isistan.flabot.coremodelEcore.FamilyElement[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "familyElement" element
     */
    public org.isistan.flabot.coremodelEcore.FamilyElement getFamilyElementArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.FamilyElement target = null;
            target = (org.isistan.flabot.coremodelEcore.FamilyElement)get_store().find_element_user(FAMILYELEMENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "familyElement" element
     */
    public int sizeOfFamilyElementArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FAMILYELEMENT$0);
        }
    }
    
    /**
     * Sets array of all "familyElement" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setFamilyElementArray(org.isistan.flabot.coremodelEcore.FamilyElement[] familyElementArray)
    {
        check_orphaned();
        arraySetterHelper(familyElementArray, FAMILYELEMENT$0);
    }
    
    /**
     * Sets ith "familyElement" element
     */
    public void setFamilyElementArray(int i, org.isistan.flabot.coremodelEcore.FamilyElement familyElement)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.FamilyElement target = null;
            target = (org.isistan.flabot.coremodelEcore.FamilyElement)get_store().find_element_user(FAMILYELEMENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(familyElement);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "familyElement" element
     */
    public org.isistan.flabot.coremodelEcore.FamilyElement insertNewFamilyElement(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.FamilyElement target = null;
            target = (org.isistan.flabot.coremodelEcore.FamilyElement)get_store().insert_element_user(FAMILYELEMENT$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "familyElement" element
     */
    public org.isistan.flabot.coremodelEcore.FamilyElement addNewFamilyElement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.FamilyElement target = null;
            target = (org.isistan.flabot.coremodelEcore.FamilyElement)get_store().add_element_user(FAMILYELEMENT$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "familyElement" element
     */
    public void removeFamilyElement(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FAMILYELEMENT$0, i);
        }
    }
    
    /**
     * Gets array of all "associatedResponsibilities" elements
     */
    public org.isistan.flabot.coremodelEcore.SimplePathNode[] getAssociatedResponsibilitiesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ASSOCIATEDRESPONSIBILITIES$2, targetList);
            org.isistan.flabot.coremodelEcore.SimplePathNode[] result = new org.isistan.flabot.coremodelEcore.SimplePathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "associatedResponsibilities" element
     */
    public org.isistan.flabot.coremodelEcore.SimplePathNode getAssociatedResponsibilitiesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.SimplePathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.SimplePathNode)get_store().find_element_user(ASSOCIATEDRESPONSIBILITIES$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "associatedResponsibilities" element
     */
    public int sizeOfAssociatedResponsibilitiesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ASSOCIATEDRESPONSIBILITIES$2);
        }
    }
    
    /**
     * Sets array of all "associatedResponsibilities" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setAssociatedResponsibilitiesArray(org.isistan.flabot.coremodelEcore.SimplePathNode[] associatedResponsibilitiesArray)
    {
        check_orphaned();
        arraySetterHelper(associatedResponsibilitiesArray, ASSOCIATEDRESPONSIBILITIES$2);
    }
    
    /**
     * Sets ith "associatedResponsibilities" element
     */
    public void setAssociatedResponsibilitiesArray(int i, org.isistan.flabot.coremodelEcore.SimplePathNode associatedResponsibilities)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.SimplePathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.SimplePathNode)get_store().find_element_user(ASSOCIATEDRESPONSIBILITIES$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(associatedResponsibilities);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "associatedResponsibilities" element
     */
    public org.isistan.flabot.coremodelEcore.SimplePathNode insertNewAssociatedResponsibilities(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.SimplePathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.SimplePathNode)get_store().insert_element_user(ASSOCIATEDRESPONSIBILITIES$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "associatedResponsibilities" element
     */
    public org.isistan.flabot.coremodelEcore.SimplePathNode addNewAssociatedResponsibilities()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.SimplePathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.SimplePathNode)get_store().add_element_user(ASSOCIATEDRESPONSIBILITIES$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "associatedResponsibilities" element
     */
    public void removeAssociatedResponsibilities(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ASSOCIATEDRESPONSIBILITIES$2, i);
        }
    }
    
    /**
     * Gets array of all "architecturalUseCaseMaps" elements
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap[] getArchitecturalUseCaseMapsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ARCHITECTURALUSECASEMAPS$4, targetList);
            org.isistan.flabot.coremodelEcore.UseCaseMap[] result = new org.isistan.flabot.coremodelEcore.UseCaseMap[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "architecturalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap getArchitecturalUseCaseMapsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(ARCHITECTURALUSECASEMAPS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "architecturalUseCaseMaps" element
     */
    public int sizeOfArchitecturalUseCaseMapsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ARCHITECTURALUSECASEMAPS$4);
        }
    }
    
    /**
     * Sets array of all "architecturalUseCaseMaps" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setArchitecturalUseCaseMapsArray(org.isistan.flabot.coremodelEcore.UseCaseMap[] architecturalUseCaseMapsArray)
    {
        check_orphaned();
        arraySetterHelper(architecturalUseCaseMapsArray, ARCHITECTURALUSECASEMAPS$4);
    }
    
    /**
     * Sets ith "architecturalUseCaseMaps" element
     */
    public void setArchitecturalUseCaseMapsArray(int i, org.isistan.flabot.coremodelEcore.UseCaseMap architecturalUseCaseMaps)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(ARCHITECTURALUSECASEMAPS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(architecturalUseCaseMaps);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "architecturalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap insertNewArchitecturalUseCaseMaps(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().insert_element_user(ARCHITECTURALUSECASEMAPS$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "architecturalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap addNewArchitecturalUseCaseMaps()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().add_element_user(ARCHITECTURALUSECASEMAPS$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "architecturalUseCaseMaps" element
     */
    public void removeArchitecturalUseCaseMaps(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ARCHITECTURALUSECASEMAPS$4, i);
        }
    }
    
    /**
     * Gets array of all "functionalUseCaseMaps" elements
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap[] getFunctionalUseCaseMapsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(FUNCTIONALUSECASEMAPS$6, targetList);
            org.isistan.flabot.coremodelEcore.UseCaseMap[] result = new org.isistan.flabot.coremodelEcore.UseCaseMap[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "functionalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap getFunctionalUseCaseMapsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(FUNCTIONALUSECASEMAPS$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "functionalUseCaseMaps" element
     */
    public int sizeOfFunctionalUseCaseMapsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FUNCTIONALUSECASEMAPS$6);
        }
    }
    
    /**
     * Sets array of all "functionalUseCaseMaps" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setFunctionalUseCaseMapsArray(org.isistan.flabot.coremodelEcore.UseCaseMap[] functionalUseCaseMapsArray)
    {
        check_orphaned();
        arraySetterHelper(functionalUseCaseMapsArray, FUNCTIONALUSECASEMAPS$6);
    }
    
    /**
     * Sets ith "functionalUseCaseMaps" element
     */
    public void setFunctionalUseCaseMapsArray(int i, org.isistan.flabot.coremodelEcore.UseCaseMap functionalUseCaseMaps)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(FUNCTIONALUSECASEMAPS$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(functionalUseCaseMaps);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "functionalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap insertNewFunctionalUseCaseMaps(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().insert_element_user(FUNCTIONALUSECASEMAPS$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "functionalUseCaseMaps" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap addNewFunctionalUseCaseMaps()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().add_element_user(FUNCTIONALUSECASEMAPS$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "functionalUseCaseMaps" element
     */
    public void removeFunctionalUseCaseMaps(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FUNCTIONALUSECASEMAPS$6, i);
        }
    }
    
    /**
     * Gets array of all "events" elements
     */
    public org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry[] getEventsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(EVENTS$8, targetList);
            org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry[] result = new org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "events" element
     */
    public org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry getEventsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry)get_store().find_element_user(EVENTS$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "events" element
     */
    public int sizeOfEventsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EVENTS$8);
        }
    }
    
    /**
     * Sets array of all "events" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setEventsArray(org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry[] eventsArray)
    {
        check_orphaned();
        arraySetterHelper(eventsArray, EVENTS$8);
    }
    
    /**
     * Sets ith "events" element
     */
    public void setEventsArray(int i, org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry events)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry)get_store().find_element_user(EVENTS$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(events);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "events" element
     */
    public org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry insertNewEvents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry)get_store().insert_element_user(EVENTS$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "events" element
     */
    public org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry addNewEvents()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.ConditionEventToConditionEventMapEntry)get_store().add_element_user(EVENTS$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "events" element
     */
    public void removeEvents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EVENTS$8, i);
        }
    }
}
